ACTOR Rocket_Launcher : BrutalWeapon Replaces RocketLauncher
{
	Game Doom
	SpawnID 29
	Speed 20
	Damage 20
	Weapon.SelectionOrder 9500
	Weapon.AmmoUse1 0
	Weapon.AmmoUse2 0
	Weapon.AmmoGive2 0
	Weapon.AmmoGive1 0
	Weapon.AmmoType1 "AmmoRocket"
	Weapon.AmmoType2 "RocketRounds"
	Weapon.PreferredSkin "RL Marine"
    Inventory.PickupSound "ROCKPKUP"
    +WEAPON.NOAUTOAIM
	+FORCEXYBILLBOARD
	+WEAPON.AXEBLOOD
	+WEAPON.EXPLOSIVE
	+WEAPON.NOAUTOFIRE
	+WEAPON.NOALERT
	Inventory.PickupMessage "$GOTLAUNCHER"
	Tag "Rocket Launcher"
	Inventory.ForbiddenTo Sorcerer, Corvus
	States
	{
	
	Ready3:
	Ready:
	ReadyLoop:
	    RLNG A 1 A_WeaponReady(WRF_ALLOWRELOAD)
		RLNG A 0 A_JumpIfInventory("Unloading",1,"Unload")
        RLNG A 0 A_JumpIfInventory("Reloading",1,"Reload")
        RLNG A 0 A_JumpIfInventory("Kicking",1,"DoKick")
		RLNG A 0 A_JumpIfInventory("Salute1", 1, "Salute")
		RLNG A 0 A_JumpIfInventory("Salute2", 1, "Salute")
        RLNG A 0 A_JumpIfInventory("Taunting",1,"Taunt")
		RLNG A 0 A_JumpIfInventory("TossGrenade",1,"TossGrenade")
		RLNG A 0 A_JumpIfInventory("HasUnloadedRL", 1, "ReadyNoAmmo")
		RLNG A 0 A_JumpIfInventory("FiredPrimary",1,"Fire")
		Loop
		
	Ready2:
		SNIP C 1 BRIGHT A_WeaponReady(WRF_ALLOWRELOAD)
		RLNG A 0 A_JumpIfInventory("FiredPrimary",1,"Fire")
		RLNG A 0 A_JumpIfInventory("Unloading",1,"Unload")
		RLNG A 0 A_JumpIfInventory("Kicking",1,"DoKick")
        RLNG A 0 A_JumpIfInventory("Taunting",1,"Taunt")
		RLNG A 0 A_JumpIfInventory("Salute1", 1, "Salute")
		RLNG A 0 A_JumpIfInventory("Salute2", 1, "Salute")
		RLNG A 0 A_JumpIfInventory("Reloading",1,"Reload")
		RLNG A 0 A_JumpIfInventory("TossGrenade",1,"TossGrenade")
		Loop	
		
	ReadyNoAmmo:
	    MISR J 1 A_WeaponReady(WRF_ALLOWRELOAD)
		RLNG A 0 A_JumpIfInventory("Unloading",1,"Unload")
        RLNG A 0 A_JumpIfInventory("Reloading",1,"Reload")
        RLNG A 0 A_JumpIfInventory("Kicking",1,"DoKick")
		RLNG A 0 A_JumpIfInventory("Salute1", 1, "Salute")
		RLNG A 0 A_JumpIfInventory("Salute2", 1, "Salute")
        RLNG A 0 A_JumpIfInventory("Taunting",1,"Taunt")
		RLNG A 0 A_JumpIfInventory("TossGrenade",1,"TossGrenade")
		Loop	
	
	NoAmmo:
		RIFG A 0
		RLNG A 0 A_Takeinventory("PowerLightAmp", 1)
		RIFG A 0 A_ZoomFactor(1.0)
		RIFG A 0 A_Takeinventory("Zoomed",1)
		RIFG A 0 A_Takeinventory("ADSmode",1)
		RIFG A 0 A_JumpIfInventory("TurboReload",1,"TurboReload")
		TNT1 A 0 A_PlaySound("weapons/empty", 4)
		NoAmmo2:
		RIFG A 0 A_JumpIfInventory("TossGrenade",1,"TossGrenade")
	    RIFG A 0 A_JumpIfInventory("Taunting",1,"Taunt")
		RIFG A 0 A_JumpIfInventory("Salute1", 1, "Salute")
		RIFG A 0 A_JumpIfInventory("Salute2", 1, "Salute")
		RIFG A 0 A_JumpIfInventory("Kicking",1,"DoKick")
		RLNG A 5 A_WeaponReady(WRF_ALLOWRELOAD | WRF_NOPRIMARY)
		RIFG A 0 A_JumpIfInventory("Reloading",1,"Reload")
		RIFG A 0 A_JumpIfInventory("TurboReload",1,"TurboReload")
		TNT1 A 0 A_JumpIfInventory("NoAutoReload", 1, "NoAmmo2")
		RIFG A 0 A_JumpIfInventory("AmmoRocket",1,"Reload")
		RIFG A 0 A_JumpIfInventory("FiredPrimary",1,"NoAmmo2")
		Goto Ready3
		
	Deselect:
        RLNG A 0
		RLNG A 0 A_Takeinventory("Zoomed",1)
		RLNG A 0 A_Takeinventory("PowerLightAmp", 1)
        RLNG A 0 A_ZoomFactor(1.0)
		RLNG A 0 A_TakeInventory("TossGrenade", 1)
		MISS DCBA 1
		TNT1 AAAAAAAAAAAAAAAAAA 0 A_Lower
		TNT1 A 1 A_Lower
		Wait
	Select:
		RLNG A 0 A_Giveinventory("GoSpecial",1)
		RLNG A 0 A_Takeinventory("HasBarrel",1)
		RLNG A 0 A_TakeInventory("TossGrenade", 1)
		TNT1 AAAAAA 0 A_RAise
		TNT1 A 0 A_Raise
		Goto ReadyPlaseholder
		ReadyPlaseholder:
	TNT1 A 0 A_PlaySound("RLANDRAW")
	TNT1 AAAAAAAA 0 A_Raise
	MISS ABCDEF 1 A_WeaponReady(WRF_NOFIRE)
	Goto Ready
		
	Fire:
		RLNG A 0
        RLNG A 0 A_JumpIfInventory("RocketRounds",1,2)
        Goto NoAmmo
        TNT1 AAAA 0
		RLNG A 0 A_ALertMonsters
		RLNG A 0 A_JumpIfInventory("Zoomed",1,"ZoomedFire")
		RLNG A 1
		
		RLNG A 0 A_JumpIfInventory("DMgame",1,"DM")
		RLNG A 0 A_FireCustomMissile("RedFlareSpawn",-5,0,0,0)
        RLNG A 0 A_PlaySound ("DSRFIRE")
		RLNG A 0 BRIGHT A_FireCustomMissile("Alerter")
		RLNG A 0 A_ZoomFactor(0.98)
		RLNF A 1 BRIGHT
		RLNG A 0 A_FireCustomMissile("Rocket2", 0, 1, 0, -6)
		RLNG A 0 A_FireCustomMissile("RocketGlassBreaker", 0, 1, 0, -6) 
		Goto RecoilAnimation
		
	DM:	
		RLNG A 0 A_FireCustomMissile("RedFlareSpawn",-5,0,0,0)
        RLNG A 0 A_PlaySound ("DSRFIRE")
		RLNG A 0 A_ZoomFactor(0.98)
		RLNF A 1 BRIGHT A_FireCustomMissile("RocketDM", 0, 1, 0, -6)
		RLNG A 0 A_FireCustomMissile("RocketGlassBreaker", 0, 1, 0, -6) 
		
	RecoilAnimation:	
		RLNG A 0 A_Takeinventory("RocketRounds",1)
		RLNG A 0 A_ZoomFactor(1.0)
		RLNF B 1 BRIGHT A_WeaponReady(WRF_NOFIRE| WRF_NOBOB)//Allows quick switch
        RLNF C 1 
        RLNF D 1 A_WeaponReady(WRF_NOFIRE| WRF_NOBOB)//Allows quick switch
		RLNF E 1 
		RLNF FGH 1 
		
		RLNG A 0 A_JumpIfInventory("Reloading",1,"Reload")
		RLNG A 0 A_JumpIfInventory("TossGrenade",1,"TossGrenade")
		RLNG AAA 1 A_WeaponReady(WRF_NOFIRE | WRF_NOBOB | WRF_ALLOWRELOAD)
		RLNG A 0 A_JumpIfInventory("Reloading",1,"Reload")
		RLNG A 0 A_JumpIfInventory("TossGrenade",1,"TossGrenade")
		RLNG BCD 2 A_WeaponReady(WRF_NOFIRE| WRF_NOBOB | WRF_ALLOWRELOAD)//Allows quick switch
        RLNG A 1
        RLNG A 0 A_Refire
        Goto Ready
		
		
	ZoomedFire:	
		SNIP C 1
		RLNG A 0 A_JumpIfInventory("DMgame",1,"ZoomedFireDM")
		RLNG A 0 A_FireCustomMissile("RedFlareSpawn",-5,0,0,0)
        RLNG A 0 A_PlaySound ("DSRFIRE")
		RLNG A 0 BRIGHT A_FireCustomMissile("Alerter")
		RLNG A 0 A_ZoomFactor(2.9)
		SNIP C 1 BRIGHT
		RLNG A 0 A_FireCustomMissile("Rocket2", 0, 1, 0, -6)
		RLNG A 0 A_FireCustomMissile("RocketGlassBreaker", 0, 1, 0, -6) 
		Goto ZoomedRecoil
		
	ZoomedFireDM:	
		RLNG A 0 A_FireCustomMissile("RedFlareSpawn",-5,0,0,0)
        RLNG A 0 A_PlaySound ("DSRFIRE")
		RLNG A 0 A_ZoomFactor(2.9)
		SNIP C 1 BRIGHT A_FireCustomMissile("RocketDM", 0, 1, 0, -6)
		RLNG A 0 A_FireCustomMissile("RocketGlassBreaker", 0, 1, 0, -6) 
		
	ZoomedRecoil:	
		RLNG A 0 A_Takeinventory("RocketRounds",1)
		RLNG A 0 A_ZoomFactor(3.0)
		SNIP C 1 BRIGHT
        SNIP C 1 BRIGHT A_SetPitch(-0.6 + pitch)
        SNIP C 1 BRIGHT
		SNIP C 1 BRIGHT
		SNIP CCC 1 BRIGHT A_SetPitch(0.1 + pitch)
		SNIP CCC 1 BRIGHT A_SetPitch(0.1 + pitch)
		SNIP CCC 2 BRIGHT
        SNIP C 1 BRIGHT
		RLNG A 0 A_JumpIfInventory("FiredPrimary",1,"Fire")
		RLNG A 0 A_JumpIfInventory("FiredSecondary",1,"HoldAim")//If still pressing alt fire, it means its holding aim
        RLNG A 0 A_Refire
        Goto Ready2	
	
    Reload:
		RLNG A 0
		RLNG A 0 A_Takeinventory("Reloading",1)
		RLNG A 0 A_ZoomFactor(1.0)
		RLNG A 0 A_TakeInventory("Zoomed", 1)
		RLNG A 0 A_Takeinventory("PowerLightAmp", 1)
		RLNG A 0 A_JumpIfInventory("HasUnloadedRL", 1, 26)
		RLNG A 1 A_WeaponReady(WRF_NOFIRE)
        RLNG A 0 A_JumpIfInventory("RocketRounds",6,"NoNeedToReload")
        RLNG A 0 A_JumpIfInventory("AmmoRocket",1,3)
        Goto Ready
        TNT1 AAAA 0
		
		RLNG A 0 A_JumpIfInventory("TurboReload",1,"TurboReload")
	
		
        RLNG A 0 A_PlaySound("Reload")
        MISR ABCDE 1 
        RLNG A 0 A_FireCustomMissile("RocketCaseSpawn",-20,0,2,-10)
        MISR EFGGG 1
		MISR HIJJJJKLM 1
        MISR MNOPONM 1
		MISR Q 1
		MISR R 1
		RLNG BCD 2
		RLNG A 1
		RLNG A 0 A_Takeinventory("HasUnloadedRL",1)
		Goto FinishReload
		
		FinishReload:
		TNT1 AAAAAA 0
		RLNG A 0 A_JumpIfInventory("RocketRounds",6,"NoNeedToReload")
		RLNG A 0 A_JumpIfInventory("AmmoRocket",1,3)
		Goto Ready
        TNT1 AAAAAA 0
		RLNG A 0 A_Giveinventory("RocketRounds",1)
		RLNG A 0 A_Takeinventory("AmmoRocket",1)
		Goto FinishReload
		
		TNT1 AAAAAAAAAA 0
		
		NoNeedToReload:
        RLNG A 1 A_Refire
        Goto Ready
		
		
	TurboReload:
		RLNG A 0 A_Takeinventory("HasUnloaded",1)
        PISS BA 0
        Goto FinishReload	


	Spawn:
		LAUN A -1
		Stop
		
	Unload:
		RLNG A 0
		RLNG A 0 A_Takeinventory("Zoomed",1)
		RLNG A 0 A_Takeinventory("PowerLightAmp", 1)
        RLNG A 0 A_ZoomFactor(1.0)
		RLNG A 0 A_JumpIfInventory("RocketRounds",1,2)
		Goto ReadyNoAMmo
		TNT1 AA 0
		
		RLNG A 1 A_WeaponReady(WRF_NOFIRE)
		RLNG A 0 A_Takeinventory("Unloading",1)
		RLNG A 0 A_ZoomFactor(1.0)
		RLNG A 0 A_TakeInventory("Zoomed", 1)
        RLNG A 0 A_JumpIfInventory("AmmoRocket",1,3)
        Goto Ready
        TNT1 AAAA 0
		
        RLNG A 0 A_PlaySound("Reload")
        MISR ABCDE 1 
        MISR EFGGG 1
		MISR HI 1
		RLNG A 0 A_Giveinventory("HasUnloadedRL",1)
		
		
	FinishUnload:
		TNT1 AAAAAA 0
		RLNG A 0 A_JumpIfInventory("RocketRounds",1,3)
		Goto ReadyNoAMmo
        TNT1 AAAA 0
		RLNG A 0 A_Takeinventory("RocketRounds",1)
		RLNG A 0 A_Giveinventory("AmmoRocket",1)
		Goto FinishUnload
		
		TNT1 AAAAAAAAAA 0
		Goto ReadyNoAMmo
		
		
	 AltFire:
        RLNG A 0
		RLNG A 0 A_JumpIfInventory("Zoomed",1,"NoAim")
		RLNG A 0 A_Giveinventory("Zoomed",1)
        RLNG A 0 A_ZoomFactor(3.0)
		RLNG A 0 A_giveinventory("PowerLightAmp", 1)
        MIAI ABCDE 1
        RLNG A 0 A_JumpIfInventory("FiredPrimary",1,"Fire")
		SNIP C 1 A_WeaponReady(WRF_ALLOWRELOAD)
		RLNG A 0 A_JumpIfInventory("FiredPrimary",1,"Fire")
		SNIP C 1 A_WeaponReady(WRF_ALLOWRELOAD)
		RLNG A 0 A_JumpIfInventory("FiredPrimary",1,"Fire")
		SNIP C 1 A_WeaponReady(WRF_ALLOWRELOAD)
		RLNG A 0 A_JumpIfInventory("FiredPrimary",1,"Fire")
		RLNG A 0 A_JumpIfInventory("FiredSecondary",1,"HoldAim")
        Goto Ready2
		
	   HoldAim:	
	    RLNG A 0 A_JumpIfInventory("FiredPrimary",1,"Fire")
		SNIP C 1 A_WeaponReady(WRF_ALLOWRELOAD)
		RLNG A 0 A_JumpIfInventory("FiredPrimary",1,"Fire")
		SNIP C 1 A_WeaponReady(WRF_ALLOWRELOAD)
		RLNG A 0 A_JumpIfInventory("FiredPrimary",1,"Fire")
		SNIP C 1 A_WeaponReady(WRF_ALLOWRELOAD)
		RLNG A 0 A_JumpIfInventory("FiredSecondary",1,"HoldAim")
	 NoAim:	
        MIAI EDBA 1
		RLNG A 0 A_Light0
		RLNG A 0 A_Takeinventory("Zoomed",1)
		RLNG A 0 A_Takeinventory("PowerLightAmp", 1)
        RLNG A 0 A_ZoomFactor(1.0)
        Goto Ready	
		

	}
}

ACTOR RocketRounds : Ammo
{
   Inventory.Amount 0
   Inventory.MaxAmount 6
   Ammo.BackpackAmount 0
   Ammo.BackpackMaxAmount 6
   Inventory.Icon "RLAUA0"
}












Actor TimeFreezer2 : PowerupGiver
{
  Inventory.Pickupmessage "Time Freezer!"
  Inventory.Icon "MEGAA0"
  Inventory.MaxAmount 0
  Inventory.UseSound "pickups/slowmo"
  Powerup.Type "TimeFreezer"
  Powerup.Duration 50
  Translation "128:143=48:63"
  +AUTOACTIVATE
  +INVENTORY.FANCYPICKUPSOUND
  States
  {
  Spawn:
    MEGA ABCD 4 bright
    Loop
  }
}

ACTOR PowerTimeFreezer2 : PowerTimeFreezer
{
  Powerup.Duration 2
}